<?php
if(!defined('InDesign')) exit('Access Denied');

function print_d($data,$oid='') {
    echo '<br/>';
    if($oid){
        echo '<span style="font-weight:bold;">[[[['.$oid.']]]]</span><br/>';
    }
    var_dump($data);
    echo '<br/>';
}

function log_d($data, $oid='default') {
    $a=fopen($oid, 'w');
    fwrite($a, print_r($data, 1));
    fclose($a);
}